import numpy as np
import matplotlib.pyplot as plt

'''
待重点分析，暂时没看懂实现原则
'''
x = np.array([1, 2, 3])  # X_{x} = 3
y = np.array([5, 7, 9, 11])  # X_{y} = 4
xv, yv = np.meshgrid(x, y)
print(xv)
print(yv)
print("-------------")

figure = plt.figure()
ax = figure.add_subplot(projection='3d')
x = np.array([1, 2, 3])  # x = (x1,x2,x3)
y = np.array([4, 5, 6, 7])  # y = (y1,y2,y3,y4)
[xv, yv] = np.meshgrid(x, y)
z = xv + yv
ax.plot_surface(xv, yv, z)
plt.show()
